package top.jlzhou.tools.http;

import java.io.File;

public class MultipartFile {

	private String name;
	private File value;
	public MultipartFile(String name, File value) {
		super();
		this.name = name;
		this.value = value;
	}
	public MultipartFile() {
		super();
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		if(name==null||"".equals(name)){
			throw new RuntimeException("参数名不能为空!");
		}
		this.name = name;
	}
	public File getValue() {
		return value;
	}
	public void setValue(File value) {
		if(value==null){
			throw new RuntimeException("文件不能为空");
		}
		if(!value.exists()){
			throw new RuntimeException("文件必须存在");
		}
		this.value = value;
	}
	
	
}
